﻿﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;
using Fcdbas.Core;
using Fcdbas.Core.Configuration;
using Fcdbas.Core.DataAccess;


namespace Fcdbas.Biz
{
    /// <summary></summary>
    [Serializable]
    [DataObject]
    [Description("")]
    [BindTable("fnd_user_profile_tab", Description = "", ConnName = "", DbType = DatabaseType.MySql)]
    public class fnd_user_profile : Entity<fnd_user_profile>,Ifnd_user_profile
    {
        #region 属性
 
        private String _identity;

        /// <summary>FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=用户^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
        [DisplayName("用户")]
        [Description("FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=用户^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(1, "identity",  null, "varchar(50)", 0, 0, false)]

        public virtual String identity

        {
            get { return _identity; }
            set { if (OnPropertyChanging(__.identity, value)) { _identity = value; OnPropertyChanged(__.identity); } }
        }

 
        private String _pres_object;

        /// <summary>FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=业务窗口^LENGTH=100^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
        [DisplayName("业务窗口")]
        [Description("FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=业务窗口^LENGTH=100^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^")]
        [DataObjectField(false, false, false, 100)]
        [BindColumn(2, "pres_object",  null, "varchar(100)", 0, 0, false)]

        public virtual String pres_object

        {
            get { return _pres_object; }
            set { if (OnPropertyChanging(__.pres_object, value)) { _pres_object = value; OnPropertyChanged(__.pres_object); } }
        }

 
        private Int32? _item_seq_no;

        /// <summary>FLAGS=K----^FORMAT=Integer^DATATYPE=Number^PROMPT=序号^LENGTH=4^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
        [DisplayName("序号")]
        [Description("FLAGS=K----^FORMAT=Integer^DATATYPE=Number^PROMPT=序号^LENGTH=4^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^")]
        [DataObjectField(false, false, true, 10)]
        [BindColumn(3, "item_seq_no",  "0", "int(11)", 10, 0, false)]

        public virtual Int32? item_seq_no

        {
            get { return _item_seq_no; }
            set { if (OnPropertyChanging(__.item_seq_no, value)) { _item_seq_no = value; OnPropertyChanged(__.item_seq_no); } }
        }

 
        private String _description;

        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
        [DisplayName("描述")]
        [Description("FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn(4, "description",  null, "varchar(200)", 0, 0, false)]

        public virtual String description

        {
            get { return _description; }
            set { if (OnPropertyChanging(__.description, value)) { _description = value; OnPropertyChanged(__.description); } }
        }

 
        //private String _profile_type_db;

        ///// <summary></summary>
        //[DisplayName("db")]
        //[Description("")]
        //[DataObjectField(false, false, true, 20)]
        //[BindColumn(5, "profile_type",  null, "varchar(20)", 0, 0, false)]

        //public virtual String profile_type_db

        //{
        //    get { return _profile_type_db; }
        //    set { if (OnPropertyChanging(__.profile_type_db, value)) { _profile_type_db = value; OnPropertyChanged(__.profile_type_db); } }
        //}

 
        private String _profile_type;

        /// <summary></summary>
        [DisplayName("Type")]
        [Description("")]
        [DataObjectField(false, false, true, 255)]
        [BindColumn(6, "profile_type",  null, "varchar(255)", 0, 0, false)]

        public virtual String profile_type

        {
            get { return _profile_type; }
            set { if (OnPropertyChanging(__.profile_type, value)) { _profile_type = value; OnPropertyChanged(__.profile_type); } }
        }

 
        private String _type_flag;

        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=类别^LENGTH=20^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
        [DisplayName("类别")]
        [Description("FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=类别^LENGTH=20^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^")]
        [DataObjectField(false, false, true, 20)]
        [BindColumn(7, "type_flag",  null, "varchar(20)", 0, 0, false)]

        public virtual String type_flag

        {
            get { return _type_flag; }
            set { if (OnPropertyChanging(__.type_flag, value)) { _type_flag = value; OnPropertyChanged(__.type_flag); } }
        }

 
        private String _info;

        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=Text^PROMPT=属性值^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
        [DisplayName("属性值")]
        [Description("FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=Text^PROMPT=属性值^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^")]
        [DataObjectField(false, false, true, 65535)]
        [BindColumn(8, "info",  null, "text", 0, 0, false)]

        public virtual String info

        {
            get { return _info; }
            set { if (OnPropertyChanging(__.info, value)) { _info = value; OnPropertyChanged(__.info); } }
        }

 
        private DateTime? _active_date;

        /// <summary>FLAGS=A-IUL^FORMAT=Datetime^DATATYPE=Date^PROMPT=更新日期^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
        [DisplayName("更新日期")]
        [Description("FLAGS=A-IUL^FORMAT=Datetime^DATATYPE=Date^PROMPT=更新日期^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^")]
        [DataObjectField(false, false, true, 0)]
        [BindColumn(9, "active_date",  null, "datetime", 0, 0, false)]

        public virtual DateTime? active_date

        {
            get { return _active_date; }
            set { if (OnPropertyChanging(__.active_date, value)) { _active_date = value; OnPropertyChanged(__.active_date); } }
        }

 
        private String _dataset;

        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=数据来源^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
        [DisplayName("数据来源")]
        [Description("FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=数据来源^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn(10, "dataset",  null, "varchar(50)", 0, 0, false)]

        public virtual String dataset

        {
            get { return _dataset; }
            set { if (OnPropertyChanging(__.dataset, value)) { _dataset = value; OnPropertyChanged(__.dataset); } }
        }

 
        private String _data_source;

        /// <summary></summary>
        [DisplayName("Source")]
        [Description("")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn(11, "data_source",  null, "varchar(200)", 0, 0, false)]

        public virtual String data_source

        {
            get { return _data_source; }
            set { if (OnPropertyChanging(__.data_source, value)) { _data_source = value; OnPropertyChanged(__.data_source); } }
        }

 
        private String _where_clause;

        /// <summary></summary>
        [DisplayName("Clause")]
        [Description("")]
        [DataObjectField(false, false, true, 2000)]
        [BindColumn(12, "where_clause",  null, "varchar(2000)", 0, 0, false)]

        public virtual String where_clause

        {
            get { return _where_clause; }
            set { if (OnPropertyChanging(__.where_clause, value)) { _where_clause = value; OnPropertyChanged(__.where_clause); } }
        }

 
        private String _order_clause;

        /// <summary></summary>
        [DisplayName("Clause1")]
        [Description("")]
        [DataObjectField(false, false, true, 400)]
        [BindColumn(13, "order_clause",  null, "varchar(400)", 0, 0, false)]

        public virtual String order_clause

        {
            get { return _order_clause; }
            set { if (OnPropertyChanging(__.order_clause, value)) { _order_clause = value; OnPropertyChanged(__.order_clause); } }
        }

 
        private String _note_text;

        /// <summary></summary>
        [DisplayName("Text")]
        [Description("")]
        [DataObjectField(false, false, true, 65535)]
        [BindColumn(14, "note_text",  null, "text", 0, 0, false)]

        public virtual String note_text

        {
            get { return _note_text; }
            set { if (OnPropertyChanging(__.note_text, value)) { _note_text = value; OnPropertyChanged(__.note_text); } }
        }

 
        private String _objid;

        /// <summary></summary>
        [DisplayName("Objid")]
        [Description("")]
        [DataObjectField(true, false, false, 50)]
        [BindColumn(15, "rowid",  null, "varchar(50)", 0, 0, false)]

        public virtual String rowid

        {
            get { return _objid; }
            set { if (OnPropertyChanging(__.objid, value)) { _objid = value; OnPropertyChanged(__.objid); } }
        }


        //private DateTime? _objversion;

        ///// <summary></summary>
        //[DisplayName("rowversion")]
        //[Description("")]
        //[DataObjectField(false, false, true, 24)]
        //[BindColumn(16, "rowversion",  null, "varchar(24)", 0, 0, false)]

        //public virtual DateTime? rowversion

        //{
        //    get { return _objversion; }
        //    set { if (OnPropertyChanging(__.objversion, value)) { _objversion = value; OnPropertyChanged(__.objversion); } }
        //}
        #endregion

        #region 获取/设置 字段值
        /// <summary>
        /// 获取/设置 字段值。
        /// 一个索引，基类使用反射实现。
        /// 派生实体类可重写该索引，以避免反射带来的性能损耗
        /// </summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.identity : return _identity;
                    case __.pres_object : return _pres_object;
                    case __.item_seq_no : return _item_seq_no;
                    case __.description : return _description;
                   // case __.profile_type_db : return _profile_type_db;
                    case __.profile_type : return _profile_type;
                    case __.type_flag : return _type_flag;
                    case __.info : return _info;
                    case __.active_date : return _active_date;
                    case __.dataset : return _dataset;
                    case __.data_source : return _data_source;
                    case __.where_clause : return _where_clause;
                    case __.order_clause : return _order_clause;
                    case __.note_text : return _note_text;
                    case __.objid : return _objid;
                   // case __.objversion : return _objversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.identity : 
                        if(value != null)
                            identity = Convert.ToString(value);
                        else
                            identity = null;
                    break;
                    case __.pres_object : 
                        if(value != null)
                            pres_object = Convert.ToString(value);
                        else
                            pres_object = null;
                    break;
                    case __.item_seq_no : 
                        if(value != null)
                            item_seq_no = Convert.ToInt32(value);
                        else
                            item_seq_no = null;
                    break;
                    case __.description : 
                        if(value != null)
                            description = Convert.ToString(value);
                        else
                            description = null;
                    break;
                    //case __.profile_type_db : 
                    //    if(value != null)
                    //        _profile_type_db = Convert.ToString(value);
                    //    else
                    //        _profile_type_db = null;
                    //break;
                    case __.profile_type : 
                        if(value != null)
                            profile_type = Convert.ToString(value);
                        else
                            profile_type = null;
                    break;
                    case __.type_flag : 
                        if(value != null)
                            type_flag = Convert.ToString(value);
                        else
                            type_flag = null;
                    break;
                    case __.info : 
                        if(value != null)
                            info = Convert.ToString(value);
                        else
                            info = null;
                    break;
                    case __.active_date : 
                        if(value != null)
                            active_date = Convert.ToDateTime(value);
                        else
                            active_date = null;
                    break;
                    case __.dataset : 
                        if(value != null)
                            dataset = Convert.ToString(value);
                        else
                            dataset = null;
                    break;
                    case __.data_source : 
                        if(value != null)
                            data_source = Convert.ToString(value);
                        else
                            data_source = null;
                    break;
                    case __.where_clause : 
                        if(value != null)
                            where_clause = Convert.ToString(value);
                        else
                            where_clause = null;
                    break;
                    case __.order_clause : 
                        if(value != null)
                            order_clause = Convert.ToString(value);
                        else
                            order_clause = null;
                    break;
                    case __.note_text : 
                        if(value != null)
                            note_text = Convert.ToString(value);
                        else
                            note_text = null;
                    break;
                    case __.objid : 
                        if(value != null)
                            _objid = Convert.ToString(value);
                        else
                            _objid = null;
                    break;
                    //case __.objversion : 
                    //    if(value != null)
                    //        _objversion = Convert.ToDateTime(value);
                    //    else
                    //        _objversion = null;
                    //break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得字段信息的快捷方式</summary>
        public class _
        {
            ///<summary>FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=用户^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public static readonly Field identity = FindByName(__.identity);

            ///<summary>FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=业务窗口^LENGTH=100^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public static readonly Field pres_object = FindByName(__.pres_object);

            ///<summary>FLAGS=K----^FORMAT=Integer^DATATYPE=Number^PROMPT=序号^LENGTH=4^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public static readonly Field item_seq_no = FindByName(__.item_seq_no);

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public static readonly Field description = FindByName(__.description);

            ///<summary></summary>
            public static readonly Field profile_type_db = FindByName(__.profile_type_db);

            ///<summary></summary>
            public static readonly Field profile_type = FindByName(__.profile_type);

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=类别^LENGTH=20^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public static readonly Field type_flag = FindByName(__.type_flag);

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=Text^PROMPT=属性值^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public static readonly Field info = FindByName(__.info);

            ///<summary>FLAGS=A-IUL^FORMAT=Datetime^DATATYPE=Date^PROMPT=更新日期^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public static readonly Field active_date = FindByName(__.active_date);

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=数据来源^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public static readonly Field dataset = FindByName(__.dataset);

            ///<summary></summary>
            public static readonly Field data_source = FindByName(__.data_source);

            ///<summary></summary>
            public static readonly Field where_clause = FindByName(__.where_clause);

            ///<summary></summary>
            public static readonly Field order_clause = FindByName(__.order_clause);

            ///<summary></summary>
            public static readonly Field note_text = FindByName(__.note_text);

            ///<summary></summary>
            public static readonly Field objid = FindByName(__.objid);

            ///<summary></summary>
           // public static readonly Field objversion = FindByName(__.objversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }

        /// <summary>取得字段名称的快捷方式</summary>
        class __
        {
            ///<summary>FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=用户^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public const String identity = "identity";

            ///<summary>FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=业务窗口^LENGTH=100^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public const String pres_object = "pres_object";

            ///<summary>FLAGS=K----^FORMAT=Integer^DATATYPE=Number^PROMPT=序号^LENGTH=4^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public const String item_seq_no = "item_seq_no";

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public const String description = "description";

            ///<summary></summary>
            public const String profile_type_db = "profile_type_db";

            ///<summary></summary>
            public const String profile_type = "profile_type";

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=类别^LENGTH=20^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public const String type_flag = "type_flag";

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=Text^PROMPT=属性值^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public const String info = "info";

            ///<summary>FLAGS=A-IUL^FORMAT=Datetime^DATATYPE=Date^PROMPT=更新日期^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>
            public const String active_date = "active_date";

            ///<summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=数据来源^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>
            public const String dataset = "dataset";

            ///<summary></summary>
            public const String data_source = "data_source";

            ///<summary></summary>
            public const String where_clause = "where_clause";

            ///<summary></summary>
            public const String order_clause = "order_clause";

            ///<summary></summary>
            public const String note_text = "note_text";

            ///<summary></summary>
            public const String objid = "rowid";

            ///<summary></summary>
           // public const String objversion = "rowversion";

        }
        #endregion
    }

    /// <summary>接口</summary>
    public partial interface Ifnd_user_profile
    {
       #region 属性
        /// <summary>FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=用户^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>

        String identity { get; set; }


        /// <summary>FLAGS=KMI--^FORMAT=Unformatted^DATATYPE=String^PROMPT=业务窗口^LENGTH=100^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>

        String pres_object { get; set; }


        /// <summary>FLAGS=K----^FORMAT=Integer^DATATYPE=Number^PROMPT=序号^LENGTH=4^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>

        Int32? item_seq_no { get; set; }


        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=描述^LENGTH=200^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>

        String description { get; set; }


        /// <summary></summary>

       // String profile_type_db { get; set; }


        /// <summary></summary>

        String profile_type { get; set; }


        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=类别^LENGTH=20^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>

        String type_flag { get; set; }


        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=Text^PROMPT=属性值^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>

        String info { get; set; }


        /// <summary>FLAGS=A-IUL^FORMAT=Datetime^DATATYPE=Date^PROMPT=更新日期^LENGTH=0^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=True^ARG=^</summary>

        DateTime? active_date { get; set; }


        /// <summary>FLAGS=A-IUL^FORMAT=Unformatted^DATATYPE=String^PROMPT=数据来源^LENGTH=50^KEYS=^REF=^VIEW=^OPTION=^PUBLIC=False^ARG=^</summary>

        String dataset { get; set; }


        /// <summary></summary>

        String data_source { get; set; }


        /// <summary></summary>

        String where_clause { get; set; }


        /// <summary></summary>

        String order_clause { get; set; }


        /// <summary></summary>

        String note_text { get; set; }


        /// <summary></summary>

        String rowid { get; set; }


        /// <summary></summary>

       // DateTime? rowversion { get; set; }

        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值。</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        Object this[String name] { get; set; }
        #endregion
    }
}